﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LayuiBlazor.Attributes;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;

namespace LayuiBlazor.Shared.Pages
{
    public partial class Index
    {
        [Inject]
        [NotNull]
        private IStringLocalizer<Foo>? Localizer { get; set; }

        private Foo Model { get; set; } = new Foo() { Name = "张三" };
    }

    public class Foo
    {
        [Required(ErrorMessage = "{0}不能为空")]
        [AutoGenerateColumn(Order = 10, Filterable = true, Searchable = true)]
        [Display(Name = "姓名")]
        public string Name { get; set; }


    }
}
